package com.example.demo.controller;

import com.example.demo.Result;
import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;


/**
 * 用户表(User)表控制层
 *
 * @author makejava
 * @since 2024-11-12 09:18:28
 */
@RestController
@RequestMapping("user")
@Tag(name = "用户表（User）")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;


    @GetMapping("getUser")
    public Result getUser(String username) {
        return Result.success(userService.getUser(username));
    }


}

